﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="svote.aspx.cs" Inherits="skvote.svote" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%
    //skvote.function.check();
    string urls = Request["urls"];
    if (string.IsNullOrEmpty(urls))
    {
        urls = "vt.aspx";
    }
    Response.Write("document.write(\"<\");\r\n");
    Response.Write("document.write(\"table border='0' width='100%' cellspacing='0' cellpadding='0'>\");\r\n");
    OleDbConnection connection = new skvote.conn().CreateConnection();
    try
    {
        OleDbCommand cmd = new OleDbCommand("select * from xh_subject order by id desc", connection);
        OleDbDataReader dr = cmd.ExecuteReader();
        while (dr.Read())
        {
            Response.Write("document.write(\"<\");\r\n");
            Response.Write("document.write(\"tr>\");\r\n");
            Response.Write("document.write(\"<\");\r\n");
            Response.Write("document.write(\"td><a href='"+urls+"?XH_sid="+dr["id"].ToString()+"'>"+dr["subject"].ToString().Trim()+"</a>\");\r\n");
            Response.Write("document.write(\"<\");\r\n");
            Response.Write("document.write(\"/td>\");\r\n");
            Response.Write("document.write(\"<\");\r\n");
            Response.Write("document.write(\"/tr>\");\r\n");
        }
        dr.Close();
        cmd.Dispose();
    }
    finally
    {
        connection.Close();
    }
    skvote.config cfg = new skvote.config();
    string weburl = cfg.getWebUrl();
    string webname = cfg.getWebName();
    Response.Write("document.write(\"<\");\r\n");
    Response.Write("document.write(\"tr>\");\r\n");
    Response.Write("document.write(\"<\");\r\n");
    Response.Write("document.write(\"td nowrap>Powered By : XHOnline Vote 2007.7.7<br>CopyRight 2004-2008 &copy;<a href='"+weburl+"'>"+webname+"</a>\");\r\n");
    Response.Write("document.write(\"<\");\r\n");
    Response.Write("document.write(\"/td>\");\r\n");
    Response.Write("document.write(\"<\");\r\n");
    Response.Write("document.write(\"/tr>\");");
    Response.Write("document.write(\"<\");\r\n");
    Response.Write("document.write(\"/table>\");");
%>